/**
 * 
 */
package core;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * @author Michael
 *
 */
public class VertexHeightSet extends HashSet<Vertex> {
	
	private static final long serialVersionUID = 6669738375161293918L;
	
	private final Map<Integer, Set<Vertex>> my_height_map;
	
	public VertexHeightSet() {
		my_height_map = new HashMap<Integer, Set<Vertex>>();
		my_height_map.put(0, new HashSet<Vertex>());
	}

	public Set<Vertex> get(final int the_height) {
		Set<Vertex> set = my_height_map.get(the_height);
		if (set == null) {
			set = new HashSet<Vertex>();
			my_height_map.put(the_height, set);
		}
		return set;
	}
}
